import request from '@/utils/request'

// 查询客户端用户列表
export function listUser(query) {
  return request({
    url: '/business/user/list',
    method: 'get',
    params: query
  })
}

// 查询客户端用户详细
export function getUser(id) {
  return request({
    url: '/business/user/' + id,
    method: 'get'
  })
}

// 新增客户端用户
export function addUser(data) {
  return request({
    url: '/business/user',
    method: 'post',
    data: data
  })
}

// 修改客户端用户
export function updateUser(data) {
  return request({
    url: '/business/user',
    method: 'put',
    data: data
  })
}

// 删除客户端用户
export function delUser(id) {
  return request({
    url: '/business/user/' + id,
    method: 'delete'
  })
}

// 状态修改
export function changeStatusUser(userId) {
  return request({
    url: '/business/user/state/' + userId,
    method: 'get'
  })
}
export function statistics(query) {
  return request({
    url: '/business/index/statistics',
    method: 'get',
    params: query
  })
}
